package com.ruoyi.dynamic.controller.app;

import com.ruoyi.common.core.constant.constant.PathConstant;
import com.ruoyi.common.core.context.SecurityContextHolder;
import com.ruoyi.common.core.pojo.vo.BaseVO;
import com.ruoyi.common.core.result.Result;
import com.ruoyi.dynamic.model.pojo.request.app.AppRoomShareAddRequest;
import com.ruoyi.dynamic.service.IRoomShareRecordService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;


@Tag(name = "App-房间分享相关", description = "App-房间分享相关")
@RestController
@RequestMapping(PathConstant.APP_PATH + "room-share")
public class AppRoomShareController {


    private final IRoomShareRecordService iRoomShareRecordService;
    public AppRoomShareController(IRoomShareRecordService iRoomShareRecordService) {
        this.iRoomShareRecordService = iRoomShareRecordService;
    }

    @Operation(summary = "直播间分享记录增加", description = "直播间分享记录增加")
    @PostMapping("add")
    public BaseVO add(@RequestBody @Valid AppRoomShareAddRequest request) {
        iRoomShareRecordService.addRecord(SecurityContextHolder.getUserId(), request);
        return Result.success();
    }



}
